//
//	GoodCommentsListModel.swift
//
//	Create by 松 松 on 14/5/2019
//	Copyright © 2019. All rights reserved.
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport

import Foundation


open class GoodCommentsListModel : NSObject, NSCoding, SSMap{

	public var appCode : String!
	public var createDate : Int!
	public var extensions : String!
	public var formUserId : String!
	public var fromUserHead : String!
	public var fromUserName : String!
	public var id : String!
	public var mainTypeCode : String!
	public var merchantId : String!
	public var score : Int!
	public var textString : String!
	public var toItemCode : String!


	/**
	 * Instantiate the instance using the passed dictionary values to set the properties values
	 */
    required public init(fromDictionary dictionary: [String:Any]){
		appCode = dictionary["appCode"] as? String
		createDate = dictionary["createDate"] as? Int
		extensions = dictionary["extension"] as? String
		formUserId = dictionary["formUserId"] as? String
		fromUserHead = dictionary["fromUserHead"] as? String
		fromUserName = dictionary["fromUserName"] as? String
		id = dictionary["id"] as? String
		mainTypeCode = dictionary["mainTypeCode"] as? String
		merchantId = dictionary["merchantId"] as? String
		score = dictionary["score"] as? Int
		textString = dictionary["textString"] as? String
		toItemCode = dictionary["toItemCode"] as? String
	}

	/**
	 * Returns all the available property values in the form of [String:Any] object where the key is the approperiate json key and the value is the value of the corresponding property
	 */
    public func toDictionary() -> [String:Any]
	{
		var dictionary = [String:Any]()
		if appCode != nil{
			dictionary["appCode"] = appCode
		}
		if createDate != nil{
			dictionary["createDate"] = createDate
		}
		if extensions != nil{
			dictionary["extension"] = extensions
		}
		if formUserId != nil{
			dictionary["formUserId"] = formUserId
		}
		if fromUserHead != nil{
			dictionary["fromUserHead"] = fromUserHead
		}
		if fromUserName != nil{
			dictionary["fromUserName"] = fromUserName
		}
		if id != nil{
			dictionary["id"] = id
		}
		if mainTypeCode != nil{
			dictionary["mainTypeCode"] = mainTypeCode
		}
		if merchantId != nil{
			dictionary["merchantId"] = merchantId
		}
		if score != nil{
			dictionary["score"] = score
		}
		if textString != nil{
			dictionary["textString"] = textString
		}
		if toItemCode != nil{
			dictionary["toItemCode"] = toItemCode
		}
		return dictionary
	}

    /**
    * NSCoding required initializer.
    * Fills the data from the passed decoder
    */
    @objc required public init(coder aDecoder: NSCoder)
	{
         appCode = aDecoder.decodeObject(forKey: "appCode") as? String
         createDate = aDecoder.decodeObject(forKey: "createDate") as? Int
         extensions = aDecoder.decodeObject(forKey: "extension") as? String
         formUserId = aDecoder.decodeObject(forKey: "formUserId") as? String
         fromUserHead = aDecoder.decodeObject(forKey: "fromUserHead") as? String
         fromUserName = aDecoder.decodeObject(forKey: "fromUserName") as? String
         id = aDecoder.decodeObject(forKey: "id") as? String
         mainTypeCode = aDecoder.decodeObject(forKey: "mainTypeCode") as? String
         merchantId = aDecoder.decodeObject(forKey: "merchantId") as? String
         score = aDecoder.decodeObject(forKey: "score") as? Int
         textString = aDecoder.decodeObject(forKey: "textString") as? String
         toItemCode = aDecoder.decodeObject(forKey: "toItemCode") as? String

	}

    /**
    * NSCoding required method.
    * Encodes mode properties into the decoder
    */
    @objc public func encode(with aCoder: NSCoder)
	{
		if appCode != nil{
			aCoder.encode(appCode, forKey: "appCode")
		}
		if createDate != nil{
			aCoder.encode(createDate, forKey: "createDate")
		}
		if extensions != nil{
			aCoder.encode(extensions, forKey: "extension")
		}
		if formUserId != nil{
			aCoder.encode(formUserId, forKey: "formUserId")
		}
		if fromUserHead != nil{
			aCoder.encode(fromUserHead, forKey: "fromUserHead")
		}
		if fromUserName != nil{
			aCoder.encode(fromUserName, forKey: "fromUserName")
		}
		if id != nil{
			aCoder.encode(id, forKey: "id")
		}
		if mainTypeCode != nil{
			aCoder.encode(mainTypeCode, forKey: "mainTypeCode")
		}
		if merchantId != nil{
			aCoder.encode(merchantId, forKey: "merchantId")
		}
		if score != nil{
			aCoder.encode(score, forKey: "score")
		}
		if textString != nil{
			aCoder.encode(textString, forKey: "textString")
		}
		if toItemCode != nil{
			aCoder.encode(toItemCode, forKey: "toItemCode")
		}

	}

}
